import org.newdawn.slick.geom.*;
import org.newdawn.slick.*;

/**
 * Write a description of class BoundBox here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class BoundBox
{
    private float x;
    private float y;
    private float width;
    private float height;
    
    /**
     * Creates a bounding box
     * 
     * @pre None
     * @param x The x position (Top left)
     * @param y The x position (Top left)
     * @param width The width of the bounding box
     * @param height The height of the bounding box
     */
    public BoundBox(float _x, float _y, float _width, float _height)
    {
        x = _x;
        y = _y;
        width = _width;
        height = _height;
    }
    
    /**
     * Returns a float 2d vector containing the offset
     */
    public Vector2f getPosition()
    {
        return new Vector2f(x, y);
    } //Ends getPosition method
    
    /**
     * Returns the X offset of the bounding box
     */
    public float getX()
    {
        return x;
    } //Ends getX method
    
    /**
     * Returns the Y position of the bounding box
     */
    public float getY()
    {
        return y;
    } //End getY method
    
    /**
     * Returns a float 2d vector containing the width and the height
     */
    public Vector2f getDimensions()
    {
        return new Vector2f(width, height);
    } //End getDimensions method
    
    /**
     * Returns the width of the bounding box
     */
    public float getWidth()
    {
        return width;
    } //End getWidth method
    
    /**
     * Returns the height of the bounding box
     */
    public float getHeight()
    {
        return height;
    } //End getHeight method
    
    /**
     * (DEBUG) Draws the bounding box
     */
    public void draw(Vector2f offset, Graphics graphics)
    {
        graphics.setColor(Color.green);
        graphics.drawRect(offset.x, offset.y, width, height);
    } //End draw
}